package com.woniu.sale.controller;

import com.woniu.common.entity.Result;
import com.woniu.sale.entity.PurRequestorderdetail;
import com.woniu.sale.service.PurRequestOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 财务结算模块
 */
@RestController
@RequestMapping("/finance")
public class FinanceController {
    @Autowired
    private PurRequestOrderService purRequestOrderService;

    @GetMapping("/shop/{shop}/{supply}")
    public Result selPurReqByShopOrSupp(@PathVariable("supply")Integer supply, @PathVariable("shop")String shop){
        List<PurRequestorderdetail> list = purRequestOrderService.selShopSale(supply, shop);
        return Result.ok("成功！").data("list",list);
    }
}
